.TH llapi_layout_extension_size_get 3 "2019 May 23" "Lustre User API"
.SH NAME
llapi_layout_extension_size_get, llapi_layout_extension_size_set \- get or set
the extension size of an extension component of a Lustre file
.SH SYNOPSIS
.nf
.B #include <lustre/lustreapi.h>
.PP
.BI "int llapi_layout_extension_size_get(const struct llapi_layout *" layout ",
.BI "                                    uint64_t *" ext_size );
.PP
.BI "int llapi_layout_extension_size_set(struct llapi_layout *" layout ",
.BI "                                    uint64_t " ext_size );
.fi
.SH DESCRIPTION
.PP
The extension size is the unit of increase the previous component size when
writing within the region of the current extension component. At the time of the
change the OSTs of the previous component layout are checked if they have
at least \fIext_size\fR free space. In case there is not enough free space,
the space covered by the extension component spills over to the next component
(see examples in \fBlfs-setstripe (1)\fR).
.PP
In case of a random write to a middle of the extension component, the extension
happens from the beginning of the extension component up to the current writing
position plus the \fIext_size\fR. However, the check for low space is still
done for the \fIext_size\fR.
.PP
.B llapi_layout_extension_size_get()
stores into
.I ext_size
the extension size of
.IR layout .
.PP
.B llapi_layout_extension_size_get()
sets the extension size of
.I layout
to
.IR ext_size .
.SH RETURN VALUES
.B llapi_layout_extension_size_get()
and
.B llapi_layout_extension_size_set()
return 0 on success, or -1 if an error occurred (in which case, errno is
set appropriately).
.SH ERRORS
.TP 15
.SM EINVAL
An invalid argument was specified.
.SH "SEE ALSO"
.BR lfs-setstripe (1),
.BR llapi_layout_alloc (3),
.BR llapi_layout_file_open (3),
.BR llapi_layout_stripe_size_set (3),
.BR llapi_layout_stripe_size_get (3),
.BR llapi_layout (7),
.BR lustreapi (7)
